<?php
class Application_Form_DangNhap extends Zend_Form
{

	public function init()
	{
		$this->setName('dangnhap');
		
		$username = new Zend_Form_Element_Text('username');
		$username->setLabel('Username :')
		->setRequired(true)
		->addFilter('StripTags')
		->addFilter('StringTrim')
		->addValidator('Alnum');
		
		$password = new Zend_Form_Element_Password('password');
		$password->setLabel('Password :')
		->setRequired(true)
		->addFilter('StripTags')
		->addFilter('StringTrim')
		->addValidator('Alnum');

		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setAttrib('id', 'submitbutton');
		
		$reset = new Zend_Form_Element_Reset('reset');

		$this->addElements(array($username,$password,$reset, $submit));
	}
}